#!/usr/bin/env ruby
=begin
	 --  wxRIDE // wxRuby Interactive Development Enviroment
	 --  Version: 0.0.1 Alpha
	 --  Created by: Mario Steele
	 --  Start Date: Sunday, September 30th, 2007
	 --  Last Modified: Sunday, September 30th, 2007

Notes:
* Need to fix buggy auto-indentation
* Implement Project Handling

jadedmoonchild
itrustseverus4e
=end

## Begin loading wxRuby
begin
	require 'wx'
rescue LoadError => no_wx_err
	begin
		require 'rubygems'
		require 'wx'
	rescue LoadError
		raise no_wx_err
	end
end
$MAIN_DIR = Dir.getwd
include Wx
require File.join($MAIN_DIR,'libs/utilities/main/style')           # Add's Fixnum#has_style?, Bignum#has_style? for Style Detection
require File.join($MAIN_DIR,'libs/gui/main/ErrorDialog')  # Error Dialog for when an fatal exception occurs

module WxRide
	class ErrorApp < App
		def on_init
			msg = <<EOMSG
MUIDE has detected a fatal error.  Information on this error is below.  MUIDE will
save this error information to fatalMuIDE.err. We apologize for the inconvience, and if
you would send the information in the error file to tulor@linuxwaves.com, we'll see what
we can do to fix the problem.

Note some (many) errors may not be fatal but are not properly caught yet.
Feedback will help improve the using experiance of later versions.
  -- regards: dev team
EOMSG
			ret = ErrorDialog.fatal(msg,"MUIDE Fatal Error",IO::read(ARGV[0]))
			exit!(0)
		end
	end
end

WxRide::ErrorApp.new.main_loop()